<? $page_title='采购需求明细记录' ?>
<?include "FASHION/page_header.phtml"?>
<script language="JavaScript" src="<?php echo $root; ?>/util/datepicker/WdatePicker.js"></script>

<form method="get">
        单号：<input type="text" name="sno" value="<?= fetch_a_string('sno') ?>" size="12" />
	&nbsp; <?= htmlutil::makeTimesRangeBox() ?>
	&nbsp; 类型：<?= Html::options2(array( 'data'=>array_combine(array(1,2,3), $types), 'tips'=>'', 
			'val'=>fetch_a_int('type'), 'name'=>'type' )) ?>
	&nbsp; <input type="submit" value="搜索" />
</form>

<table border="0" class="list"><tbody>
<tr class="nobg">
	<th width="130">时间</th>
	<th>单号</th>
	<th>部门</th>
	<th>用户</th>
	<th>审批状态</th>
	<th>采购类型</th>
	<th>总数量</th>
	<th>操作</th>
</tr>
<?foreach($list as $d){?>
<tr>
	<td class="nowrap"><?=date('Y/m/d H:i', $d.addtime)?></td>
	<td><?$d.sno?></td>
	<td><?$d.dept_name?></td>
	<td><?$d.user_name?></td>
	<td class="state"><?= DemandHelper::flow2text($d.audit_flow) ?></td>
	<td class="state"><?= DemandHelper::type2text($d.type) ?></td>
	<td class="decimal"><{$d.amount}></td>
	<td>
		<a href="<?url("proc-view/id/".$d.id)?>" class="view" title="查看"></a>
	</td>
</tr>
<? } ?>
</tbody></table>

<? Html::pager($pager) ?>

<ul class="notice">
	<li>具有“需求汇总”权限的用户可以查看全部的采购需求</li>
	<li>无特殊权限者，这里只能看到自己的采购需求</li>
</ul>

<?include "FASHION/page_footer.phtml"?>
